package com.tao.mapper;

import com.tao.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    public  int deleteByPrimaryKey(Integer id);

    public  User selectByPrimaryKey(Integer id);

    public   int updateByPrimaryKeySelective(User record);

    public  int updateByPrimaryKey(User record);

    @Select("select * from user")
    public List<User> selectAll();

    @Select("select * from user where username =#{username} ")
    public  User selectByname(@Param("username") String username);


    public int insertUser(User user);

}